The present invention relates to a method and apparatus for pre-fetching data, and more particularly, to pre-fetching audio data for use by an audio signal processor.
Many of us have seen films containing remarkably realistic dinosaurs, aliens, animated toys and other fanciful creatures. Such animations are made possible by computer graphics. Using such techniques, a computer graphics artist can specify how each object should look and how it should change in appearance over time, and a computer then models the objects and displays them on a display such as your television or a computer screen. The computer takes care of performing the many tasks required to make sure that each part of the displayed image is colored and shaped just right based on the position and orientation of each object in a scene, the direction in which light seems to strike each object, the surface texture of each object, and other factors.
Because computer graphics generation is complex, computer-generated three-dimensional graphics just a few years ago were mostly limited to expensive specialized flight simulators, high-end graphics workstations and supercomputers. The public saw some of the images generated by these computer systems in movies and expensive television advertisements, but most of us couldn""t actually interact with the computers doing the graphics generation. All this has changed with the availability of relatively inexpensive 3D graphics platforms such as, for example, the Nintendo 64(copyright) and various 3D graphics cards now available for personal computers. It is now possible to interact with exciting 3D animations and simulations on relatively inexpensive computer graphics systems in your home or office.
Interactive 3D computer graphics systems are often used to play video games. The xe2x80x9cgaming experiencexe2x80x9d however typically involves more than just video content. For example, almost all gaming experiences involve audio content that accompanies the video content. The audio subsystem described herein enables sound emitters to be placed in three-dimensional space and provides a powerful means of generating psycho-acoustic 3D sound effects with a pair of speakers. The audio subsystem includes an audio memory that is usable, for example, to store sound samples, instrument wave tables, audio tracks and the like read from a mass storage device such as a DVD. The samples, wave tables, tracks, etc. are subsequently read out and processed by an audio digital signal processor to produce the game audio content. This content is transferred to a main memory from where it is subsequently read out for supply to a decoder and output to speakers. The separate audio memory improves the access for the audio processing circuitry to audio data by avoiding the need to contend with other resources (e.g., the graphics subsystem) attempting to access the main system memory.
A wavetable refers to a table of pre-recorded sound waves (e.g., for an instrument such as a piano) stored in a memory. Typically, these sounds are stored as files in a particular format (e.g., WAV or AIFF). Sound files may be played from beginning to end as shown in FIG. 12A or sound files may be provided with loop points so that they loop as specified (possibly with envelope reduction) until stopped as shown in FIG. 12B. Providing loop points permits sound files to be smaller because portions of the files are replayed. However, while permitting reduced sound file sizes, looping causes memory addressing problems because of the need to jump back to the loop point. Memory addressing generally is most efficient when the next address for data read out is obtained by incrementing the current address. However, looping requires that address registers for addressing the memory in which the sound files are stored be reset one or more times to the loop point. While incrementing address registers to read the data at the next file address can be performed quickly, resetting the registers takes a longer time and can result in a latency period between the output of data at the last pre-loop-back address and the output of data at the loop-back address. This can result in interruptions in the audio output and adversely impact the player""s gaming experience.
In accordance with one aspect of the present invention, the possibility of corrupted audio is minimized by pre-fetching audio data. Because pre-fetched data is already present when the address registers are re-set, the audio digital signal processor can continue reading data during the latency period. In one example, an audio system includes a memory storing an audio file and an audio signal processor for processing the audio file. Addressing circuitry addresses the memory and a pre-fetch storage area stores data for a current address and for one or more following addresses to hide memory access latency during address changes of the addressing circuitry.